package com.bruce.ssm.dao;


import com.bruce.ssm.entity.User;
import com.bruce.ssm.base.BaseDao;
import org.springframework.stereotype.Repository;

import java.io.Serializable;
import java.util.List;

@Repository
public class UserDao extends BaseDao implements IUserDao {

    public User addUser(User user) {
        save(user);
        return user;
    }

    public User deleteUser(String userId) {
        return deleteById(userId);
    }

    public User updateUser(User user) {
        return null;
    }

    public List<User> getAllUser() {
        return getAll();
    }

    public User getUser(String userId) {
        return (User) findOneIt(userId);
    }

    public Object findOne(Serializable entityId) {
        return null;
    }
}
